FROM openjdk:8-jre-alpine
MAINTAINER yl

## RUN mkdir -p /opt/buaa-ynii-darm && mkdir -p /opt/buaa-ynii-darm/logs && echo "Asia/Shanghai">/etc/timezone

COPY target/*.jar /app.jar
RUN apk add -U tzdata;\
ln -sf /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime; \
echo 'Asia/Shanghai' >/etc/timezone; \
touch /app.jar

EXPOSE 8080

ENV JAVA_OPTS=""
ENV PARAMS=""

ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/.urandom $JAVA_OPTS -jar /app.jar $PARAMS"]